﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Specialized;

namespace TathamOddie.OpenSearchValidator.Logic
{
	public class XhtmlTag
	{
		private string tagName;
		private NameValueCollection attributes;

		public XhtmlTag(string tagName, NameValueCollection attributes)
		{
			this.tagName = tagName;
			this.attributes = attributes;
		}

		public string TagName
		{
			get { return tagName; }
		}

		public NameValueCollection Attributes
		{
			get { return attributes; }
		}

		public string this[string attributeName]
		{
			get
			{
				return attributes.AllKeys.Contains(attributeName) ? attributes[attributeName] : null;
			}
		}
	}
}